package D12_19z.BU_7;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Demo {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException, InvocationTargetException {
        demo01();
    }
    public static void demo01() throws IllegalAccessException, InvocationTargetException, InstantiationException {
        Map<String, Object[]> map = new HashMap<>();
        map.put("bookname",new String[]{"匆匆"});
        map.put("author",new String[]{"朱自清"});
        map.put("price",new Double[]{99.0});
        map.put("publishDate",new Date[]{new Date()});
        Book book = new Book();
        Object populate = MyBeanUtils.populate(book.getClass(), map);
        System.out.println(populate);
    }
}
